import { DatabaseDao } from '../../../../Index';
import { IDao } from './IDao';
import { Table } from './Table';

export type ExtractDaoTable<T extends Dao<any>> = T extends Dao<infer M> ? M : never

export class Dao<T extends Table<any>> extends IDao<T> {
  readonly table: T
  readonly dao: DatabaseDao<T>
}